Skip to content

healthchecker: use kube-proxy /livez to avoid scale-down false alerts#1306

Open
dpacgdm wants to merge 2 commits into
kubernetes:masterfrom
dpacgdm:fix/kube-proxy-livez-scale-down
Open

healthchecker: use kube-proxy /livez to avoid scale-down false alerts#1306
dpacgdm wants to merge 2 commits into
kubernetes:masterfrom
dpacgdm:fix/kube-proxy-livez-scale-down

Conversation

@dpacgdm

@dpacgdm dpacgdm commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Cluster Autoscaler marks nodes with ToBeDeletedByClusterAutoscaler during scale-down. kube-proxy /healthz intentionally fails in that case for load-balancer connection draining (KEP-3836), which caused NPD to report kube-proxy as unhealthy and fire unnecessary alerts.

Switch the kube-proxy health check endpoint from /healthz to /livez. /livez still checks process and dataplane synchronization health; it only excludes the node-eligibility check used for scale-down draining.

Related issue

#1176

Test plan

  • go test ./pkg/healthchecker/... ./cmd/healthchecker/...
  • Updated endpoint unit tests to expect /livez for kube-proxy

Cluster Autoscaler marks nodes with ToBeDeletedByClusterAutoscaler during
scale-down. kube-proxy /healthz intentionally fails in that case for LB
connection draining (KEP-3836), which made NPD report kube-proxy as
unhealthy. Switch the kube-proxy probe to /livez, which reflects process
health only.

Signed-off-by: dpacgdm <dpac.gdm@gmail.com>
@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 9, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from klueska and mrunalp July 9, 2026 09:00
@kubernetes-prow kubernetes-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 9, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @dpacgdm. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 9, 2026
@dpacgdm

dpacgdm commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Friendly ping: this PR is still waiting on /ok-to-test from a kubernetes org member so CI can run. Happy to address any feedback — thanks for taking a look when you have a chance.

@hakman hakman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Small comment nit: /livez still checks dataplane synchronization health, it only excludes node eligibility. Could we adjust the wording accordingly?

Comment thread pkg/healthchecker/types/types.go Outdated
kubeProxyHealthCheckEndpoint = fmt.Sprintf("http://%s/healthz", net.JoinHostPort(hostAddress, kubeProxyPort))
// Use /livez for kube-proxy so Cluster Autoscaler scale-down (ToBeDeletedByClusterAutoscaler
// taint) does not make NPD report kube-proxy as unhealthy. /healthz intentionally fails in
// that case for load-balancer connection draining (KEP-3836); /livez only reflects process health.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// that case for load-balancer connection draining (KEP-3836); /livez only reflects process health.
// that case for load-balancer connection draining (KEP-3836); /livez reports kube-proxy
// dataplane health without considering node eligibility.

@hakman

hakman commented Jul 22, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 22, 2026
@dpacgdm

dpacgdm commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — will fix the wording. You're right: /livez still covers dataplane synchronization health; it only drops the node-eligibility / scale-down draining check that /healthz includes. Updating the comment (and PR description) accordingly.

/livez still checks process and dataplane sync health; it only excludes
the node-eligibility check used by /healthz for scale-down draining.

Signed-off-by: dpacgdm <dpac.gdm@gmail.com>
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dpacgdm
Once this PR has been reviewed and has the lgtm label, please ask for approval from hakman. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants